<?php
//产品中心详情页面
$curr_page =1;
include 'head.php';

if(isset($_GET['id']))
{
	$id = $_GET['id'];
}
?>
<link href="1.css" rel="stylesheet" type="text/css">
<style>
  .xgxw p{
    margin:5px  0px;
  }
  .xgxw p a{
    color:#336699;
  }
</style>
	 
     	<div id="main" style="background: #FFFFFF; background-repeat:no-repeat; width:960px;height:auto;">
	     	<?php
	     	$sql = "select a.id,a.name,a.model,a.tao_link,a.type_id,a.price,a.path,a.remark,a.content,a.dates,a.ishot,a.isnews from en_product as a where a.flag =1 and a.id=".$_GET['id'];
            $result = mysql_query($sql);
            $row = mysql_fetch_array($result);
            
            $sql_t1 = "select * from en_pro_type where id in ({$row['type_id']}) and flag = 1";
            $ret_t1 = mysql_query($sql_t1);
            while ($row2 = mysql_fetch_array($ret_t1)){
                $row['type'][] = array('id' => $row2['id'], 'name' => $row2['name']);
            }
	     	?>
			 <div id="dh" style="background:none;height:auto;padding-bottom:20px;">
				<div style="width:648px;  float:left; margin:17px 0 0 16px;">
						<div style="background:url(images/xw_nrt_2.jpg); width:648px; height:33px; float:left;">
							<h1 style="margin:11px 0 0 16px;"><a href="product.php">Product</a><span style="margin:2px 9px 3px 9px;"><img src="images/xw_lbarxl.png"/></span><span style="color: #999999;"><?php echo $row['name'];?></span></h1>
						</div>
						<div style="background-color:#FFFFFF; border:1px solid #c8c8c8; float:left; width:616px;  margin-top:-1px;padding:15px;">
						    
								<!--标题详情-->
								<div style="width:616px;">
									<div style="width:222px; float:left;padding-bottom:10px;">
										<img style="width:204px;height:147px;" src="<?php echo $row['path'];?>"/>
									</div>
									<div style=" width:360px; float:left;  margin:25px 0 10px 30px; font-size:13px;">
										<div>
											 <div style="line-height:30px;">
											 <span style="font-weight: bold;">Item: </span><span style="color:#81a615; font-weight:bold;"><?php echo $row['name'];?></span>					
										 </div>
										 <div>
											 <span style="font-weight: bold;">Model: </span><span style="color:#81a615; font-weight:bold;"><?php echo $row['model'];?></span>
										  </div>
										  <div> <span style=" line-height:30px;font-weight: bold;">Price: </span><span style="color:#81a615; font-weight:bold;"><?php echo $row['price'];?></span></div>
										  <div>
                                            <span style="font-weight: bold;">Type: <?php foreach($row['type'] as $v){?><span style="color:#81a615; font-weight:bold; line-height:30px;"><a style="color:#81a615;" href="product.php?type=<?php echo $v['id'];?>"><?php echo $v['name'];?></a></span>&nbsp;&nbsp;<?php }?></span>
                                          </div>
                                          <div>
                                            <span style="font-weight: bold;">Ebay: <span style="color:#81a615; font-weight:bold; line-height:30px;"><a style="color:#81a615;" href="<?php echo $row['tao_link'];?>"><img src="images/buytb.png" style="vertical-align: middle;" /></a></span></span>
                                          </div>
										  <div> <span style="color:#81a615; font-weight:bold;"> <a href="<?php echo "download1.php?id={$row['id']}";?>">Download</a></span></div>
										</div>
										
									
								    </div>
								    <div style="clear:both;"></div>
								   	<div>
										<?php echo $row['content'];?>
									</div>
								    <div style="clear:both;"></div>
								    
								</div>
								
								<div class="xgxw" style="margin-top:60px;">
                                  <?php
                                    $sql = "select * from en_news where locate(keyword,'{$row['name']}') limit 0, 5";
                                    $ret = mysql_query($sql);
                                  ?>
                                  <p>相关新闻</p>
                                  <?php while($row4 = mysql_fetch_array($ret)){?>
                                    <p><a href="news_info.php?id=<?php echo $row['id'];?>"><?php echo $row4['title']?></a></p>
                                  <?php }?>
                                </div>
							
						</div>
						   
						<div style="clear:both;"></div>
				</div>
						  
				 
								
							<div class="rt" style="height:520px;">
													
								<a style="background: url(images/xw_gg10.jpg);"></a>
						
							    <a style="background: url(images/xw_gg11.jpg); width:264px; height:321px; margin-top:12px;"></a>
						    
							</div> 
			 

	 			<div style="clear:both;"></div>
		     </div>
		     
		</div>
		  
		   <?php include 'bottom.php';?>
